import QtQuick 1.0
import "common"

ODialog {
    id: root
    opacity: 1
    property alias name :name.text
       property alias host : host.text
    property alias port : port.text
    property alias username : username.text
    property alias password : password.text
    property alias passive : passiveRadioButton.passive


    Column {
        id:column
        spacing: 45
        anchors.top: parent.top
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.topMargin: 30

        OLineEdit {
            id:name
            label:"Name : "
            text: "Default"

        }


        OLineEdit {
            id:host
            label:"Host : "
            text: "192.168.0.1"

        }
        OLineEdit {
            id:port
            label:"Port : "
            text: "21"

        }
        OLineEdit {
            id:username
            label:"Username : "
            text: "user"
        }
        OLineEdit {
            id:password
            label:"Password :"
            textInput.echoMode: TextInput.Password
        }

        Item {
            width: column.width
            height: 50
            Row {
                id:passiveRadioButton
                anchors.centerIn: parent
                spacing: 30
                property bool passive : true


                TextButton {
                    id: passiveBtn

                    text:"Passive"
                    checked: parent.passive
                    onClicked: parent.passive = true

                }
                TextButton {
                    id: activeBtn
                    text:"Active"
                    checked: !parent.passive
                    onClicked:parent.passive = false

                    // onClicked:checked = !checked


                }

            }


        }
    }
}
